package com.yj.ccs.abs.web.management.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yj.ccs.abs.common.enums.UserRoleType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/3/14
 * Author     : Unbelievable9
 **/
@Data
@JsonIgnoreProperties(value = {"password", "password_salt", "create_time", "existed"})
public class User {

    @ApiModelProperty(hidden = true)
    private Long id;

    @ApiModelProperty(hidden = true)
    private String username;

    @ApiModelProperty(hidden = true)
    private String account;

    @ApiModelProperty(hidden = true)
    private String firm;

    @ApiModelProperty(hidden = true)
    private String apartment;

    @ApiModelProperty(hidden = true)
    private String area_code;

    @ApiModelProperty(hidden = true)
    private String cellphone;

    @ApiModelProperty(hidden = true)
    private UserRoleType role_type;

    @ApiModelProperty(hidden = true)
    private Boolean active;

    @ApiModelProperty(hidden = true)
    private String password;

    @ApiModelProperty(hidden = true)
    private String password_salt;

    @ApiModelProperty(hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime create_time;

    @ApiModelProperty(hidden = true)
    private String creator;

    // Local
    @ApiModelProperty(hidden = true)
    private Boolean existed = false;
}
